//
//  HZ_hout_Find_CollectionReusableView.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/3/31.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZ_hout_Find_CollectionReusableView.h"

@interface HZ_hout_Find_CollectionReusableView ()


@property (nonatomic, strong) UILabel *label;
@property (nonatomic, strong) UILabel *labelTwo;
@property (nonatomic, strong) UILabel *morelabel;
@property (nonatomic, strong) UIButton *morebutton;

@end

@implementation HZ_hout_Find_CollectionReusableView


- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        
//        self.backgroundColor = [UIColor clearColor];
        
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 1)];
        view.backgroundColor = [UIColor colorWithWhite:0.716 alpha:1.000];
        [self addSubview:view];
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width / 3, self.bounds.size.height)];
//        self.label.backgroundColor = [UIColor greenColor];
//        self.label.text = @"八戒";
        //        self.label.textAlignment = NSTextAlignmentCenter;
        self.label.backgroundColor = [UIColor clearColor];
        [self addSubview:self.label];

        
        self.morelabel = [[UILabel alloc] initWithFrame:CGRectMake(2 * self.bounds.size.width / 3, 0,  self.bounds.size.width / 3, self.bounds.size.height)];
//        self.morelabel.backgroundColor = [UIColor colorWithRed:0.754 green:0.360 blue:1.000 alpha:1.000];
        self.morelabel.text = @"更 多 ⥤";
        _morelabel.textColor = [UIColor colorWithWhite:0.742 alpha:1.000];
        self.morelabel.textAlignment = NSTextAlignmentCenter;
        self.morelabel.font = [UIFont systemFontOfSize:18];
        _morelabel.backgroundColor = [UIColor clearColor];
        [self addSubview:self.morelabel];
        
        
        
        self.morebutton = [UIButton buttonWithType:UIButtonTypeSystem];
        
        
        self.morebutton.frame = CGRectMake(2 * self.bounds.size.width / 3, 0,  self.bounds.size.width / 3, self.bounds.size.height);
                self.morebutton.tintColor = [UIColor whiteColor];
//        self.morebutton.backgroundColor = [UIColor whiteColor];
//        self.morebutton.titleLabel.font = [UIFont systemFontOfSize:20];
        
        [self.morebutton addTarget:self action:@selector(moreButton:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:self.morebutton];
        
    }
    return self;
}


-(void)moreButton:(UIButton *)button{
    
    
    
    NSNotificationCenter *gengduo = [NSNotificationCenter defaultCenter];
    NSString *str = [NSString stringWithFormat:@"%ld", self.age];
    
    [gengduo postNotificationName:@"11" object:str userInfo:nil];
    
    
    
}
//-(void)setAge:(NSInteger)age{
//    
//    _age = age;
//    
//}

-(void)setModel:(HZ_Find_Model *)model{
    
    _model = model;
    
    self.label.text = _model.name;
    
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
